//
// Created by 35111 on 2025/3/27.
//

#ifndef NEXUSBOOST_ERROR_H
#define NEXUSBOOST_ERROR_H

#include <iostream>


#ifndef NDEBUG
#define WMaker_Error(Condition, ErrorNumber, ErrorMessage) \
    do { \
        if ((Condition)) { \
            std::cerr << "Failed: " #Condition\
                      << ", file " << __FILE__ \
                      << ", line " << __LINE__ << std::endl \
                      << ErrorNumber << ": " << ErrorMessage << std::endl;\
            std::abort(); \
        } \
    } while (0)
#else
#define WMaker_Error(Condition, ErrorNumber, ErrorMessage) ((void)0)
#endif

/// Error00001: Invalid expression\n
/// Error00002: Initial elements exceed capacity\n
/// Error00003: Array this position has no data written\n
/// Error00004: Array is full\n
/// Error00005: Array is empty\n
/// Error00006: Array will be full\n
/// Error00007: Array index out of range\n

#endif //NEXUSBOOST_ERROR_H
